STEP 5: The user's response should be either a yes or a no, or to put it more mathematically, true or false.

In Python, a boolean is a special data type that only has two values: True or False.

  • In our program, "yes" should correlate to True and anything else should correlate to False.
  • In your else statement, change the value to the right of the = sign from True to False.
  • Then, in , drag in Return Statement inside ask_user_question, but outside else.

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)